<script>
// 外部文件加载类
export default class ScriptLoader{
    // 在页面的尾部添加js标签
    static appendScriptToBodyAfter(url,isAsync) {
       let script = document.createElement("script");
       script.type="text/javascript";
       if(isAsync){
           script.setAttributeNode(document.createAttribute("async"));
           script.setAttributeNode(document.createAttribute("defer"));
        }
        script.src=url;
        document.body.appendChild(script);
    }
}
</script>
